package com.ishowcode;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class MainApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(MainApplication.class, args);
       if (run.containsBean("user01")) System.out.println(run.getBean("user01"));
       else System.out.println("user01组件创建失败");
       if (run.containsBean("pet01")) System.out.println(run.getBean("pet01"));
       else System.out.println("pet01组件创建失败");

    }
}
